/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import djhu.xml.commons.RootElement;
import djhu.xml.commons.XMLObject;
import java.sql.Date;
import java.io.Serializable;
/**
 *
 * @author wudihua
 */

@RootElement(path = "/Encounter")
public class EncounterBean implements Serializable{

    //就诊人员ID
    @XMLObject(xpath = "./id/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterId;

    //就诊前的状态
    @XMLObject(xpath = "./text/status/@value", ntype = XMLObject.ATTRIBUTE)
    private String historyStatus;

    // 获取文本的时候需要去除 文本标签中的规范文件。例如：<div xmlns="http://www.w3.org/1999/xhtml">张三的就诊</div>
    // 需要去掉 xmlns="http://www.w3.org/1999/xhtml"
    //就诊人名称
    @XMLObject(xpath = "./text/div", ntype = XMLObject.TEXT)
    private String category;

    //就诊状态
    @XMLObject(xpath = "./status/@value", ntype = XMLObject.ATTRIBUTE)
    private String status;

    //就诊类型标识
    @XMLObject(xpath = "./class/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String typeAlias;
    //就诊类型名称
    @XMLObject(xpath = "./class/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String typeName;

    //关联患者
    private String refPatient;
    // 患者名称
    @XMLObject(xpath = "./subject/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String encounterName;

    //主治医生标识
    @XMLObject(xpath = "./participant/type/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String doctorAlias;
    //主治医生类型
    @XMLObject(xpath = "./participant/type/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String doctorType;
    //关联医生
    private String refDoctor;
    //主治医生名称
    @XMLObject(xpath = "./participant/individual/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String doctorName;

    @XMLObject(xpath = "./period/start/@value", ntype = XMLObject.ATTRIBUTE)
    private String stime;

    @XMLObject(xpath = "./period/end/@value", ntype = XMLObject.ATTRIBUTE)
    private String etime;

    //入院日期 2018-04-10
    private String startDate;
    //入院时间 10:20:45
    private String startTime;
    //出院日期 2018-04-20
    private String endDate;
    //出院时间 10:20:45
    private String endTime;

    //版本号，默认创建为1，执行更新操作，依次增加
    private String versionNumber;

    // 更新时间
    private Date updateTime;

    //就诊原因
    @XMLObject(xpath = "./reason/text/@value", ntype = XMLObject.ATTRIBUTE)
    private String reason;

    //关联诊断
    private String refDiagnosis;
    //诊断原因
    @XMLObject(xpath = "./diagnosis/condition/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String diagnosisCondition;
    //诊断类型标识
    @XMLObject(xpath = "./diagnosis/role/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String diagnosisTypeAlias;
    //诊断类型名称
    @XMLObject(xpath = "./diagnosis/role/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String diagnosisTypeName;
    //诊断类型级别
    @XMLObject(xpath = "./diagnosis/rank/@value", ntype = XMLObject.ATTRIBUTE)
    private String diagnosisRank;

    //关联来源
    private String refOrigin;
    //患者来源名称
    @XMLObject(xpath = "./hospitalization/origin/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String originName;
    //患者来源类型标识
    @XMLObject(xpath = "./hospitalization/admitSource/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String originTypeAlias;
    //患者来源类型名称
    @XMLObject(xpath = "./hospitalization/admitSource/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String originTypeName;

    //患者去向标识
    @XMLObject(xpath = "./hospitalization/dischargeDisposition/coding/code/@value", ntype = XMLObject.ATTRIBUTE)
    private String destinationAlias;
    //患者去向名称
    @XMLObject(xpath = "./hospitalization/dischargeDisposition/coding/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String destinationName;

    //关联就诊机构
    private String refServiceProvider;
    //就诊医疗机构名称
    @XMLObject(xpath = "./serviceProvider/display/@value", ntype = XMLObject.ATTRIBUTE)
    private String medicalInstitutionName;

    //删除状态
    private String deleteStatus;

    //更新状态
    private String updateStatus;

    public String getRefPatient() {
        return refPatient;
    }

    public void setRefPatient(String refPatient) {
        this.refPatient = refPatient;
    }

    public String getRefDoctor() {
        return refDoctor;
    }

    public void setRefDoctor(String refDoctor) {
        this.refDoctor = refDoctor;
    }

    public String getRefDiagnosis() {
        return refDiagnosis;
    }

    public void setRefDiagnosis(String refDiagnosis) {
        this.refDiagnosis = refDiagnosis;
    }

    public String getRefOrigin() {
        return refOrigin;
    }

    public void setRefOrigin(String refOrigin) {
        this.refOrigin = refOrigin;
    }

    public String getRefServiceProvider() {
        return refServiceProvider;
    }

    public void setRefServiceProvider(String refServiceProvider) {
        this.refServiceProvider = refServiceProvider;
    }

    
    
    

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getVersionNumber() {
        return versionNumber;
    }

    public void setVersionNumber(String versionNumber) {
        this.versionNumber = versionNumber;
    }

    public String getEncounterId() {
        return encounterId;
    }

    public void setEncounterId(String encounterId) {
        this.encounterId = encounterId;
    }

    public String getHistoryStatus() {
        return historyStatus;
    }

    public void setHistoryStatus(String historyStatus) {
        this.historyStatus = historyStatus;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getTypeAlias() {
        return typeAlias;
    }

    public void setTypeAlias(String typeAlias) {
        this.typeAlias = typeAlias;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getEncounterName() {
        return encounterName;
    }

    public void setEncounterName(String encounterName) {
        this.encounterName = encounterName;
    }

    public String getDoctorAlias() {
        return doctorAlias;
    }

    public void setDoctorAlias(String doctorAlias) {
        this.doctorAlias = doctorAlias;
    }

    public String getDoctorType() {
        return doctorType;
    }

    public void setDoctorType(String doctorType) {
        this.doctorType = doctorType;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getStime() {
        return stime;
    }

    public void setStime(String stime) {
        this.stime = stime;
    }

    public String getEtime() {
        return etime;
    }

    public void setEtime(String etime) {
        this.etime = etime;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getDiagnosisCondition() {
        return diagnosisCondition;
    }

    public void setDiagnosisCondition(String diagnosisCondition) {
        this.diagnosisCondition = diagnosisCondition;
    }

    public String getDiagnosisTypeAlias() {
        return diagnosisTypeAlias;
    }

    public void setDiagnosisTypeAlias(String diagnosisTypeAlias) {
        this.diagnosisTypeAlias = diagnosisTypeAlias;
    }

    public String getDiagnosisTypeName() {
        return diagnosisTypeName;
    }

    public void setDiagnosisTypeName(String diagnosisTypeName) {
        this.diagnosisTypeName = diagnosisTypeName;
    }

    public String getDiagnosisRank() {
        return diagnosisRank;
    }

    public void setDiagnosisRank(String diagnosisRank) {
        this.diagnosisRank = diagnosisRank;
    }

    public String getOriginName() {
        return originName;
    }

    public void setOriginName(String originName) {
        this.originName = originName;
    }

    public String getOriginTypeAlias() {
        return originTypeAlias;
    }

    public void setOriginTypeAlias(String originTypeAlias) {
        this.originTypeAlias = originTypeAlias;
    }

    public String getOriginTypeName() {
        return originTypeName;
    }

    public void setOriginTypeName(String originTypeName) {
        this.originTypeName = originTypeName;
    }

    public String getDestinationAlias() {
        return destinationAlias;
    }

    public void setDestinationAlias(String destinationAlias) {
        this.destinationAlias = destinationAlias;
    }

    public String getDestinationName() {
        return destinationName;
    }

    public void setDestinationName(String destinationName) {
        this.destinationName = destinationName;
    }

    public String getMedicalInstitutionName() {
        return medicalInstitutionName;
    }

    public void setMedicalInstitutionName(String medicalInstitutionName) {
        this.medicalInstitutionName = medicalInstitutionName;
    }

    @Override
    public String toString() {
        return "EncounterBean{" +
                "encounterId='" + encounterId + '\'' +
                ", historyStatus='" + historyStatus + '\'' +
                ", category='" + category + '\'' +
                ", status='" + status + '\'' +
                ", typeAlias='" + typeAlias + '\'' +
                ", typeName='" + typeName + '\'' +
                ", encounterName='" + encounterName + '\'' +
                ", doctorAlias='" + doctorAlias + '\'' +
                ", doctorType='" + doctorType + '\'' +
                ", doctorName='" + doctorName + '\'' +
                ", stime='" + stime + '\'' +
                ", etime='" + etime + '\'' +
                ", startDate='" + startDate + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endDate='" + endDate + '\'' +
                ", endTime='" + endTime + '\'' +
                ", reason='" + reason + '\'' +
                ", diagnosisCondition='" + diagnosisCondition + '\'' +
                ", diagnosisTypeAlias='" + diagnosisTypeAlias + '\'' +
                ", diagnosisTypeName='" + diagnosisTypeName + '\'' +
                ", diagnosisRank='" + diagnosisRank + '\'' +
                ", originName='" + originName + '\'' +
                ", originTypeAlias='" + originTypeAlias + '\'' +
                ", originTypeName='" + originTypeName + '\'' +
                ", destinationAlias='" + destinationAlias + '\'' +
                ", destinationName='" + destinationName + '\'' +
                ", medicalInstitutionName='" + medicalInstitutionName + '\'' +
                ", deleteStatus='" + deleteStatus + '\'' +
                ", updateStatus='" + updateStatus + '\'' +
                '}';
    }

    public String getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(String deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public String getUpdateStatus() {
        return updateStatus;
    }

    public void setUpdateStatus(String updateStatus) {
        this.updateStatus = updateStatus;
    }

    public EncounterBean() {
    }

    public EncounterBean(String encounterId, String historyStatus, String category, String status, String typeAlias, String typeName, String encounterName, String doctorAlias, String doctorType, String doctorName, String stime, String etime, String startDate, String startTime, String endDate, String endTime, String reason, String diagnosisCondition, String diagnosisTypeAlias, String diagnosisTypeName, String diagnosisRank, String originName, String originTypeAlias, String originTypeName, String destinationAlias, String destinationName, String medicalInstitutionName) {
        this.encounterId = encounterId;
        this.historyStatus = historyStatus;
        this.category = category;
        this.status = status;
        this.typeAlias = typeAlias;
        this.typeName = typeName;
        this.encounterName = encounterName;
        this.doctorAlias = doctorAlias;
        this.doctorType = doctorType;
        this.doctorName = doctorName;
        this.stime = stime;
        this.etime = etime;
        this.startDate = startDate;
        this.startTime = startTime;
        this.endDate = endDate;
        this.endTime = endTime;
        this.reason = reason;
        this.diagnosisCondition = diagnosisCondition;
        this.diagnosisTypeAlias = diagnosisTypeAlias;
        this.diagnosisTypeName = diagnosisTypeName;
        this.diagnosisRank = diagnosisRank;
        this.originName = originName;
        this.originTypeAlias = originTypeAlias;
        this.originTypeName = originTypeName;
        this.destinationAlias = destinationAlias;
        this.destinationName = destinationName;
        this.medicalInstitutionName = medicalInstitutionName;
    }
}
